@echo off
rem #####################################################
rem Checks if the Version located in the default.aspx
rem footer contains the correct version
rem 
rem Usage smoke_test.cmd <page_url> <version>
rem
rem Example: smoke_test.cmd http://127.0.0.1/webcalc.int/default.aspx Calc-Web-1.1.28.11
rem 
rem #####################################################

set healthcheck_page=%1
set version=%2

wget %healthcheck_page% -O health.html --tries=10
findstr /c:"(Version: %version%)" health.html
if %errorlevel%==0 (
	echo Version Found!
) else (
	exit /b %errorlevel%
)